package com.xbongbong.pro.statistic.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author zhouwq
 * @date 2019/5/14 16:18
 */

@Setter
@Getter
@ToString
public class LogStashEditDTO extends BaseDTO {
    private static final long serialVersionUID = -748494502784869586L;

    /**
     * rabbitMQ 用户名
     */
    private String user;

    /**
     * rabbitMQ 密码
     */
    private String password;

    /**
     * es节点信息 节点需要双引号 格式：[192.168.10.18:9300","192.168.10.17:9300","192.168.10.19:9300"]
     */
    private String[] hosts;

    /**
     * 版本环境类型 开发/测试/本地
     * @see com.xbongbong.pro.enums.ProVersionEnum
     */
    private String version;

    /**
     * rabbitMQ 端口
     */
    private Integer port;

    public String[] getHosts() {
        if (hosts == null) {
            return null;
        }else{
            return hosts.clone();
        }
    }

    public void setHosts(String[] hosts) {
        if (hosts == null)
        {
            this.hosts = null;
        } else {
            this.hosts = hosts.clone();
        }
    }
}
